layui.use(['table', 'form', 'tableSelect'], function () {
    var $ = layui.jquery,
        table = layui.table,
        form = layui.form,
        tableSelect = layui.tableSelect;

    //新增证券下拉表单
    tableSelect.render({
        elem: '#securitiesName'
        , table: {
            url: '../Hello'
            , cellMinWidth: 60
            , cols: [
                [
                    {type: 'checkbox'},
                    {field: 'test1', title: '测试1'},
                    {field: 'test2', title: '测试2'},
                ]
            ]
        }
        , done: function (elem, data) {
            var NEWJSON = [];
            layui.each(data.data, function (index, item) {
                NEWJSON.push(item.securitiesName);
                $("#securitiesId").val(item.securitiesId);
            })
            elem.val(NEWJSON.join(","));

        }
    })
});
